import React from 'react';
import { Route, Switch } from 'react-router-dom';
import Helmet from 'react-helmet';
import * as Routes from '../../routes';
import MainMenu from './mainMenu';

const App = () => (
  <div>
    <Helmet
      htmlAttributes={{ lang: 'en', amp: undefined }} // amp takes no value
      titleTemplate="%s | Universal React POC "
      titleAttributes={{ itemprop: 'name', lang: 'en' }}
      meta={[
        { name: 'description', content: 'Server side rendering example' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      ]}
    />
    <MainMenu />
    <Switch>
      <Route exact path="/" component={Routes.HomePage} />
      <Route path="/about" component={Routes.AboutPage} />
    </Switch>
  </div>
);
export default App;
